class Project < ActiveRecord::Base
  belongs_to :owner, :class_name => "User", :foreign_key => "owner_id"
    
  has_many :milestones
  has_many :activities
  has_many :messages
  
  has_many :designations
  has_many :users, :through => :designations
  
  has_many :logs
  
  def to_param
    "#{id}-#{name.gsub(/[^a-z0-9]+/i, '-')}".downcase
  end
end
